#ifndef SHOPITEMWIDGET_H
#define SHOPITEMWIDGET_H

#include "ShopItem.h"

class ShopWidget;

#include <QWidget>
#include <QLabel>

class ShopItemWidget : public QWidget
{
    Q_OBJECT
    public:
        static const int WIDTH  = 200;
        static const int HEIGHT = 200;

        explicit ShopItemWidget( ShopWidget* shop, ShopItem* item_, QString s )
        :item(item_), picture( new QLabel( this ) )
        {
            initialize( shop, s );
        }

        virtual ~ShopItemWidget() {
            delete picture;
        }


    protected:
          // used to intialize picture
        void setPicture( QImage* i );
    protected slots:
        void mousePressEvent( QMouseEvent* );
    private:
          // item which it represents
        ShopItem* item;
          // picture which is shown in shop
        QLabel* picture;

        void initialize( ShopWidget* shop, QString s );
};

#endif // SHOPITEMWIDGET_H
